<% 
	/*********************************************************************
	* @author :weicb
	* @createTime: 2016-04-28
	* Remark: 角色新增
	*  
    *          
	* Modify: 	
	*********************************************************************/
%>
<%@ page language="java" isELIgnored="false" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@ include file="/WEB-INF/jsp/ResourceGlobal.jsp"%>
<html>
<head>   
 <!-- 这里引入导航信息header.tpl -->
 <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="<%=context%>resources/modules/system/sys/role.js?20190801"></script>
<script type="text/javascript" src="<%=context%>resources/modules/system/sys/role.create.js?20190802"></script>
<title>新增数据角色信息</title>
<script type="text/javascript">
var pagePath = '<%=context%>' +'sys/role/';
//默认加载
$(function(){
	//把访问路径传到js
	setPathPrefix(pagePath);
});
</script>
</head>
<body class="sub-page">
	<form id="roleAddForm" name="roleAddForm" role="form"
		class="form-horizontal" method="post"
		action="">
		<fieldset>
			<div class="page-content">
				<div class="page-header">
					<h4 class="page-title">新增数据角色信息</h4>
				</div>
					<!--开始展示业务数据-->
  				<div class="form-group">
					<label class="col-sm-2 control-label">角色名称<span
						class="text-danger">*</span></label>
					<div class="col-sm-10">
						<input type="text" placeholder="角色名称" class="form-control" name="roleName" id="roleName" value=""/>
					</div>
				</div>
  				<div class="form-group" id="roleTypeDiv">
						<label class="col-sm-2 control-label">角色类型<span
							class="text-danger">*</span></label>
						<div class="col-sm-10 form-inner">
							<select class="form-control " placeholder="角色类型" name="roleType" id="roleType" onchange="WASP_ROLE.showShareInfo()">
								<option value=""></option>
								<wasp:dictOptions dctRootType="ROLE_XXX_TYPE" initValue="${postVo.postRank }"></wasp:dictOptions>
							</select>
						</div>
				</div>
				
				
				<div class="form-group" id="postDiv">
						<label class="col-sm-2 control-label">所属岗位</label>
							
						<div class="col-sm-10 form-inner">
							<select  type="text" class="form-control use-select2" id="postId" name="postId"></select>
						</div>
				</div>
				
				<div class="form-group" id="operRoleDiv">
						<label class="col-sm-2 control-label">关联操作角色<span
							class="text-danger">*</span></label>
						<div class="col-sm-10 form-inner">
							<select type="text" class="form-control use-select2" id="operRoleId" name="operRoleId"></select>
						</div> 
				</div>
				
				
				<div class="form-group" id="isDemptDiv">
				
					<label class="col-sm-2 control-label" style="float:left;">是否为部门资源默认角色<span
							class="text-danger">*<a tabindex="0" role="button" data-toggle="popover" data-trigger="hover" data-container="body" data-content="若为是，关联部门下资源默认赋权至当前数据角色" data-placement="right" class="fa fa-exclamation-circle fa-lg text-info"></a></span>
							
					</label>
					<div class="col-sm-10 form-inner">
						<select name="isDempt" id="isDempt" class="form-control use-select2" placeholder="是否为部门资源默认角色" onchange="IsDefault(this);">
							<option value="">请选择</option>
							<option value="Y">是</option>
							<option value="N">否</option>
						</select>
					</div>
				</div>
				
				<div class="form-group" id="isDemptPerDiv">
				
					<label class="col-sm-2 control-label" style="float:left;">是否为部门人员默认角色<span
							class="text-danger">*<a tabindex="0" role="button" data-toggle="popover" data-trigger="hover" data-container="body" data-content="若为是， 关联部门下新入司员工默认添加至当前数据角色" data-placement="right" class="fa fa-exclamation-circle fa-lg text-info"></a></span>
							
					</label>
					<div class="col-sm-10 form-inner">
						<select name="isDemptPer" id="isDemptPer" class="form-control use-select2" placeholder="是否为部门人员默认角色" onchange="IsDefault(this);">
							<option value="">请选择</option>
							<option value="Y">是</option>
							<option value="N">否</option>
						</select>
					</div>
				</div>
				
				<div class="form-group" id="deptDiv">
						<label class="col-sm-2 control-label">关联部门<span
							class="text-danger" id="pre_dempt" style="display:none">*</span></label>
						<div class="col-sm-10 form-inner">
							<select class="form-control use-select2" placeholder="关联部门" id="deptId" name="orgId"></select>
						</div> 
				</div>
				
				<div class="form-group" id="isMiddleBackDiv">
						<label class="col-sm-2 control-label">是否中后台角色<span class="text-danger">*</span></label>
						<div class="col-sm-10 form-inner">
							<select name="isMiddleBack" id="isMiddleBack" class="form-control use-select2" placeholder="是否中后台角色">
								<option value=""></option>
								<wasp:dictOptions dctRootType="DAT_YES_NOX"></wasp:dictOptions>
							</select>
						</div> 
				</div>
				
				<div class="hr-line-dotted"></div>
				
				<div class="form-group" id="empDiv">
						<label class="col-sm-2 control-label">员工姓名<span
							class="text-danger">*</span></label>
						<div class="col-sm-10 form-inner">
							<select class="form-control use-select2" placeholder="员工姓名" id="empIds" name="empIds"></select>
						</div> 
				</div>
				
				<div class="hr-line-dotted"></div>
				
				<div class="form-group" id="authorityTypeDiv">
						<label class="col-sm-2 control-label" >权限类型<span
							class="text-danger">*</span></label>
						<div class="col-sm-10 control-label">
							<span>
					        	<input class="i-radios" type="radio" id="authorityType1" name="authorityType" value="1" checked="checked" onclick="WASP_ROLE.showShareInfo()" />
					        	普通
					        </span>
					        <span>
					        	<input class="i-radios" type="radio" id="authorityType2" name="authorityType" value="2" onclick="WASP_ROLE.showShareInfo()" />
					        	特殊
					        </span>
						</div>
				</div>
				<div class="form-group" id="shareInfoContainerDiv">
						<label class="col-sm-2 control-label">分享权限列表</label>
						<div class="col-sm-10 control-label" id="shareInfoContainer">
						</div>
				</div>
  				
					<div class="page-footer">
						<button type="button" id="btnSubmit" name="btnSubmit"
							class="btn btn-primary btn-save btn-loading btn-w-xs"
							data-loading-text="<i class='ico-loading'></i>"
							onclick="submitAddForm();">提交</button>
						<button type="button" id="btnCancle" name="btnCancle" class="btn btn-link btn-w-xs"
							onclick="window.close();">取消</button>
					</div>
				</div>
			</fieldset>
					
</form>
</body>
</html>